#include "widget.h"
#include "./ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(&thread,&TimeThread::sendTime,this,&Widget::ShowTime);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_button_clicked()
{
    thread.start();
}

void Widget::ShowTime(QString Time)
{
    ui->label->setText(Time);
}
